<template>
  <div class="mydetail">
    <div class="title">
      <li @click="back"><img src="../../assets/左箭头.png" alt="" /></li>
      <span>个人资料</span>
    </div>
    <div class="cons">
      <li class="imgs">
        <span>头像</span>
        <img :src="msg.img" alt="" />
      </li>
      <li>
        <span>昵称</span>
        <span>{{ msg.name }}</span>
      </li>
      <li>
        <span>手机号</span>
        <span>{{ msg.tel }}</span>
      </li>
      <li>
        <span>生日</span>
        <img src="../../assets/右箭头.png" alt="" />
      </li>
   
      <li>
        <span>退出登录</span>
        <img src="../../assets/右箭头.png" alt="" />
      </li>
      <li>
        <span>隐私政策</span>
        <img src="../../assets/右箭头.png" alt="" />
      </li>
      <li>
        <span>用户协议</span>
        <img src="../../assets/右箭头.png" alt="" />
      </li>
      <button @click="back">保存</button>
    </div>
  </div>
</template>

<script>
import { defineComponent, computed, reactive } from "vue";
import { useStore } from "vuex";
import { useRoute, useRouter } from "vue-router";
export default defineComponent({

  setup(props, context) {
    let state = reactive({
      mid: "0",
    });
    let { mid } = state;
    let store = useStore();
    let Route = useRoute();
    let Router = useRouter();
    const back = () => {
      console.log(Router, "rrrrrr");
      Router.go(-1);
    };
    return {
      msg: computed(() => JSON.parse(Route.query.newMsg)),
      state,
      back,
    };
  },
});
</script>

<style lang="scss">
.title {
  width: 100%;
  height: 3.5rem;
  line-height: 3.5rem;
  text-align: center;
  border-bottom: 0.1rem solid #eee;
  display: flex;
  flex-direction: row;
  span {
    font-weight: 800;
    flex: 1;
  }
  img {
    width: 1.7rem;
    height: 1.7rem;
    margin: 0.8rem 0;
  }
}
.cons {
  .imgs {
    height: 4rem;
    line-height: 4rem;
    img {
      width: 3.7rem;
      height: 3.7rem;
      border-radius: 50%;
    }
  }
  li {
    height: 3.5rem;
    line-height: 3.5rem;
    padding: 0 0.6rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    img {
      width: 1.2rem;
      height: 1.2rem;
      margin: 0.6rem 0;
    }
  }
  button {
    width: 80%;
    height: 2.6rem;
    border-radius: 2rem;
    background: none;
    border: 0.1rem solid purple;
    color: purple;
    margin: 1rem;
    outline: none;
  }
}
</style>